import request from '@/utils/request'

/**
 * 注册
 * @param username 用户名 password密码
 * @returns
 */

export const register = data => {
  return request({
    url: '/user/registered',
    method: 'POST',
    data
  })
}

/**
 *登录
 * @param {username,password} data
 * @returns
 */

export const login = data => {
  return request({
    url: '/user/login',
    method: 'POST',
    data
  })
}
